from redis import Redis
def init_session(app):
    """根据seesion配置初始化redis保存session的链接对象"""
    host = app.config.get("SESSION_REDIS_HOST")
    port = app.config.get("SESSION_REDIS_PORT")
    db = app.config.get("SESSION_REDIS_DB")
    app.config["SESSION_REDIS"] = Redis(host=host,port=port,db=db)